<?php
require_once("./settings.inc.php");
if(file_exists(X2_PROJECT ."/settings.inc.php")){
    require_once(X2_PROJECT ."/settings.inc.php");
}
require_once("./functions.inc.php");
require_once("./classes/x2.class.php");

if(X2_COMPATIBILITY){
    $x2 = x2::getInstance();
    $x2 -> process(
  	    (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'? 'https://' : 'http://') .
  	    $_SERVER['HTTP_HOST'] .
        $_SERVER['REDIRECT_URL'] .
        (!empty($_SERVER['QUERY_STRING'])? "?". $_SERVER['QUERY_STRING'] : ''),
        $_SERVER['REQUEST_METHOD']
    );
} else {
    x2::incompatible();
}
?>